﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ZX.Web.UI.Controls;
using ZX.CRM.Bussiness;
using System.Data;

namespace ZX.WebApp.Crm.Report
{
    public partial class RptMeetingSign : BasePage
    {
        BCrmReport BReport = new BCrmReport();
        protected void Page_Load(object sender, EventArgs e)
        {
            DoReport(txtProductLayoutID.Value);
        }
        private void DoReport(string courseName)
        {
            try
            {
                DataSet myDataSet = new DataSet();
                
                myDataSet = BReport.ReturnDsMeetingSign(courseName);
                if (myDataSet != null)
                {
                    myDataSet.DataSetName = "DsMeetingSign";
                    myDataSet.Tables[0].TableName = "DtSign";
                    DataTable datetable = new DataTable("DTDate");
                    myDataSet.Tables.Add(datetable);
                    datetable.Columns.Add("BeginDate", typeof(string));
                    datetable.Columns.Add("EndDate", typeof(string));
                    datetable.Columns.Add("CourseName", typeof(string));
                    datetable.Rows.Add(new object[] { "", "",courseName });
                    ZX.CRM.Report.CrmReport.RptMeetingSign crm = new ZX.CRM.Report.CrmReport.RptMeetingSign();
                    crm.DataSource = myDataSet;
                    RV.Report = crm;
                }

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void btnDone_Click(object sender, EventArgs e)
        {
            DoReport(txtProductLayoutID.Value);
        }
    }
}